import Vue from 'vue'
import Router from 'vue-router'
import Login from '@/components/Login'
import Main from '@/components/Main'
import Form from '@/components/Form'
import Chart from '@/components/Chart'
import Editor from '@/components/Editor'
import Table from '@/components/Table'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    {
      path: '/main',
      component: Main,
      children: [
        {
          path: '',
          component: Chart
        },
        {
          path: 'chart',
          name: 'Chart',
          component: Chart
        },
        {
          path: 'form',
          name: 'Form',
          component: Form
        },
        {
          path: 'editor',
          name: 'Editor',
          component: Editor
        },
        {
          path: 'table',
          name: 'Table',
          component: Table
        }
      ]
    }
  ]
})
